package xiaohu.day3.HJ35;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int n = scanner.nextInt();
            int[][] arr = new int[n][n];
            arr[0][0]=1;
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n-i; j++) {
                    if(i==0 && j==0){
                        continue;
                    }
                    if (j == 0 && i != 0) {
                        arr[i][j] = arr[i-1][j]+i;
                        continue;
                    }
                    arr[i][j] = arr[i][j-1]+j+1+i;
                }
            }
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < n-i; j++) {
                    System.out.print(arr[i][j]+" ");
                }
                System.out.println();
            }
        }
    }
}
